<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>Vue:组件嵌套使用</title>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app1">
			<my-header>
				<my-header1>
					<button slot='left'><--</button>
					<button slot='right'>--></button>
				</my-header1>
			</my-header>
		</div>
		<script type="text/javascript">
			new Vue({
				el: '#app1',
				components:{
					'my-header': {
						data:function(){
							return {
								title: 'Hello VUE2'
							}
						},
						template: '<h2>{{title}}<slot /></h2>'
					},
					'my-header1': {
						template: '<h4><slot name="left"/> VUE2 <slot name="right"/></h4>'
					}
				}
			});
		</script>
	</body>
</html>
